package com.liyuci.eleon.syslog;

import com.liyuci.core.entity.BaseModel;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 系统日志信息
 * @author liyuci
 * @date 2018-02-04 16:00:35
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table
public class SysLog extends BaseModel
{
	private static final long serialVersionUID = 1L;
	/**
	 * id
	 * name：请求的方法注释名称，@ApiOperation的value值
	 * delFlag
	 * createDate：请求日期
	 */
	private String className;			//请求属于哪个Controller
	private String methodName;			//请求的Controller方法
	@Column(length = 500)
	private String paramNames;			//请求参数的对应值
	@Column(length = 500)
	private String paramValues;		//请求参数的对应值
	private String requestMethod;		//请求的方式，如GET、POST、PUT、DELETE等
	private String logLevel;			//日志输出等级，有INFO、ERROR等
	private String ipAddress;			//Ip地址
	private Long takeTime;				//耗时多少毫秒
	private String headUserAgent;		//请求头的User-Agent
	@Column(length = 1000)
	private String headCookie;			//请求头的Cookie
	private String headReferer;			//请求头的Referer
	private String requestUrl;			//请求地址
	private String requestProtocol;		//请求协议
	private String returnType;			//请求请求方法返回的类型
	@Column(length = 1000)
	private String returnValue;			//请求请求方法返回值，报错时该值为null
	@Column(length = 1000)
	private String exceptionMsg;		//请求请求的报错信息，报错时才会存在值
	private String userIdentity;
}
